simple_server_objects = simple_server_main.o ServerSocket.o Socket.o
simple_client_objects = simple_client_main.o ClientSocket.o Socket.o
main_object = main.o ClientSocket.o Socket.o Serialization.o timer.o DbOperation.o

clean: obj
	rm  *.o

obj: $(simple_server_objects) $(simple_client_objects) $(main_object)
	g++ -o server $(simple_server_objects)
	g++ -o client $(simple_client_objects)
	g++ -o 1main $(main_object) -pthread -lmysqlpp

simple_server_main.o: simple_server_main.cpp
	g++ -c simple_server_main.cpp
simple_client_main.o: simple_client_main.cpp
	g++ -c simple_client_main.cpp
main.o: main.cpp
	g++ -c -I/usr/include/mysql++/ -I/usr/include/mysql/ main.cpp
ServerSocket.o: ./socket_lib/ServerSocket.cpp
	g++ -c ./socket_lib/ServerSocket.cpp
ClientSocket.o: ./socket_lib/ClientSocket.cpp
	g++ -c ./socket_lib/ClientSocket.cpp
Socket.o: ./socket_lib/Socket.cpp
	g++ -c ./socket_lib/Socket.cpp
Serialization.o: Serialization.cpp
	g++ -c Serialization.cpp
timer.o: ./thread_func/timer.cpp
	g++ -c ./thread_func/timer.cpp 
DbOperation.o: ./db_operation/DbOperation.cpp
	g++ -c -I/usr/include/mysql++/ -I/usr/include/mysql/ ./db_operation/DbOperation.cpp 
